package org.utils.net;

import java.net.Socket;

import org.utils.common.EnhancedException;
import org.utils.thread.AbstractObjectManager;

/**
 * @author Manuel EVENO
 * @version 1.0
 */

public abstract class SocketHandler extends AbstractObjectManager
{
	/**
	 * 
	 */
	public SocketHandler()
	{
		super();
	}
	/**
	 * This method is call for each object handled by this thread.
	 * You must inherit and define this method to make your own treatment.
	 */
	protected void handleObject(Object item) throws EnhancedException
	{
		handleSocket( (Socket) item );
	}
	/**
	 * This method is call for each socket handled by this thread.
	 * You must inherit and define this method to make your own treatment.
	 */
	protected abstract void handleSocket(Socket s) throws EnhancedException;
}
